/**
 * Created by medina on 26/09/14.
 */
public class Diamond {
    public static void main (String[] args){
        draw_triangle(4);
        draw_diamond(7);

    }
    public static void draw_triangle(int n){
        int cur_stars = 1;
        int blank_spaces;
        for(int i = 1; i <=n; i++) {
            blank_spaces = n - i;
            for (int j = 1; j <= blank_spaces; j++)
                System.out.print(" ");
            for (int k = 1; k <= cur_stars; k++)
                System.out.print("*");
            cur_stars = i * 2 + 1;
            System.out.println();
        }
    }
    public static void draw_diamond(int n){
        int cur_stars = n * 2 - 1 - 2;
        draw_triangle(n);
        int total_lines= n * 2 - 1;
        int blank_spaces = 1;
        for(int i = n+1; i <= total_lines; i++){
            for (int j = 1; j <= blank_spaces; j++)
                System.out.print(" ");
            for (int k = 1; k <= cur_stars; k++)
                System.out.print("*");
            cur_stars = cur_stars - 2;
            blank_spaces++;
            System.out.println();
        }


    }
}
